{
 "cells": [
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "# MTLR (N-MTLR) Example \n",
    "\n",
    "In this notebook, we will present a simple example of the neural network version of the `MTLR` method described in \n",
    "[this](https://papers.nips.cc/paper/4210-learning-patient-specific-cancer-survival-distributions-as-a-sequence-of-dependent-regressors) and [this paper](https://arxiv.org/pdf/1801.05512.pdf).\n",
    "\n",
    "For a more verbose introduction to `pycox` see [this notebook](https://nbviewer.jupyter.org/github/havakv/pycox/blob/master/examples/01_introduction.ipynb)."
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 1,
   "metadata": {},
   "outputs": [],
   "source": [
    "import numpy as np\n",
    "import matplotlib.pyplot as plt\n",
    "\n",
    "# For preprocessing\n",
    "from sklearn.preprocessing import StandardScaler\n",
    "from sklearn_pandas import DataFrameMapper \n",
    "\n",
    "import torch # For building the networks \n",
    "import torchtuples as tt # Some useful functions\n",
    "\n",
    "from pycox.datasets import metabric\n",
    "from pycox.models import MTLR\n",
    "from pycox.evaluation import EvalSurv"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 2,
   "metadata": {},
   "outputs": [],
   "source": [
    "## Uncomment to install `sklearn-pandas`\n",
    "# ! pip install sklearn-pandas"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 3,
   "metadata": {},
   "outputs": [],
   "source": [
    "np.random.seed(1234)\n",
    "_ = torch.manual_seed(123)"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "## Dataset\n",
    "\n",
    "We load the METABRIC data set as a pandas DataFrame and split the data in in train, test and validation.\n",
    "\n",
    "The `duration` column gives the observed times and the `event` column contains indicators of whether the observation is an event (1) or a censored observation (0)."
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 4,
   "metadata": {},
   "outputs": [],
   "source": [
    "df_train = metabric.read_df()\n",
    "df_test = df_train.sample(frac=0.2)\n",
    "df_train = df_train.drop(df_test.index)\n",
    "df_val = df_train.sample(frac=0.2)\n",
    "df_train = df_train.drop(df_val.index)"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 5,
   "metadata": {},
   "outputs": [
    {
     "data": {
      "text/html": [
       "<div>\n",
       "<style scoped>\n",
       "    .dataframe tbody tr th:only-of-type {\n",
       "        vertical-align: middle;\n",
       "    }\n",
       "\n",
       "    .dataframe tbody tr th {\n",
       "        vertical-align: top;\n",
       "    }\n",
       "\n",
       "    .dataframe thead th {\n",
       "        text-align: right;\n",
       "    }\n",
       "</style>\n",
       "<table border=\"1\" class=\"dataframe\">\n",
       "  <thead>\n",
       "    <tr style=\"text-align: right;\">\n",
       "      <th></th>\n",
       "      <th>x0</th>\n",
       "      <th>x1</th>\n",
       "      <th>x2</th>\n",
       "      <th>x3</th>\n",
       "      <th>x4</th>\n",
       "      <th>x5</th>\n",
       "      <th>x6</th>\n",
       "      <th>x7</th>\n",
       "      <th>x8</th>\n",
       "      <th>duration</th>\n",
       "      <th>event</th>\n",
       "    </tr>\n",
       "  </thead>\n",
       "  <tbody>\n",
       "    <tr>\n",
       "      <td>0</td>\n",
       "      <td>5.603834</td>\n",
       "      <td>7.811392</td>\n",
       "      <td>10.797988</td>\n",
       "      <td>5.967607</td>\n",
       "      <td>1.0</td>\n",
       "      <td>1.0</td>\n",
       "      <td>0.0</td>\n",
       "      <td>1.0</td>\n",
       "      <td>56.840000</td>\n",
       "      <td>99.333336</td>\n",
       "      <td>0</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <td>1</td>\n",
       "      <td>5.284882</td>\n",
       "      <td>9.581043</td>\n",
       "      <td>10.204620</td>\n",
       "      <td>5.664970</td>\n",
       "      <td>1.0</td>\n",
       "      <td>0.0</td>\n",
       "      <td>0.0</td>\n",
       "      <td>1.0</td>\n",
       "      <td>85.940002</td>\n",
       "      <td>95.733330</td>\n",
       "      <td>1</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <td>3</td>\n",
       "      <td>6.654017</td>\n",
       "      <td>5.341846</td>\n",
       "      <td>8.646379</td>\n",
       "      <td>5.655888</td>\n",
       "      <td>0.0</td>\n",
       "      <td>0.0</td>\n",
       "      <td>0.0</td>\n",
       "      <td>0.0</td>\n",
       "      <td>66.910004</td>\n",
       "      <td>239.300003</td>\n",
       "      <td>0</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <td>4</td>\n",
       "      <td>5.456747</td>\n",
       "      <td>5.339741</td>\n",
       "      <td>10.555724</td>\n",
       "      <td>6.008429</td>\n",
       "      <td>1.0</td>\n",
       "      <td>0.0</td>\n",
       "      <td>0.0</td>\n",
       "      <td>1.0</td>\n",
       "      <td>67.849998</td>\n",
       "      <td>56.933334</td>\n",
       "      <td>1</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <td>5</td>\n",
       "      <td>5.425826</td>\n",
       "      <td>6.331182</td>\n",
       "      <td>10.455145</td>\n",
       "      <td>5.749053</td>\n",
       "      <td>1.0</td>\n",
       "      <td>1.0</td>\n",
       "      <td>0.0</td>\n",
       "      <td>1.0</td>\n",
       "      <td>70.519997</td>\n",
       "      <td>123.533333</td>\n",
       "      <td>0</td>\n",
       "    </tr>\n",
       "  </tbody>\n",
       "</table>\n",
       "</div>"
      ],
      "text/plain": [
       "         x0        x1         x2        x3   x4   x5   x6   x7         x8  \\\n",
       "0  5.603834  7.811392  10.797988  5.967607  1.0  1.0  0.0  1.0  56.840000   \n",
       "1  5.284882  9.581043  10.204620  5.664970  1.0  0.0  0.0  1.0  85.940002   \n",
       "3  6.654017  5.341846   8.646379  5.655888  0.0  0.0  0.0  0.0  66.910004   \n",
       "4  5.456747  5.339741  10.555724  6.008429  1.0  0.0  0.0  1.0  67.849998   \n",
       "5  5.425826  6.331182  10.455145  5.749053  1.0  1.0  0.0  1.0  70.519997   \n",
       "\n",
       "     duration  event  \n",
       "0   99.333336      0  \n",
       "1   95.733330      1  \n",
       "3  239.300003      0  \n",
       "4   56.933334      1  \n",
       "5  123.533333      0  "
      ]
     },
     "execution_count": 5,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "df_train.head()"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "## Feature transforms\n",
    "\n",
    "The METABRIC dataset has  9 covariates: `x0, ..., x8`.\n",
    "We will standardize the 5 numerical covariates, and leave the binary covariates as is.\n",
    "Note that PyTorch require variables of type `'float32'`.\n",
    "\n",
    "We like using the `sklearn_pandas.DataFrameMapper` to make feature mappers."
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 6,
   "metadata": {},
   "outputs": [],
   "source": [
    "cols_standardize = ['x0', 'x1', 'x2', 'x3', 'x8']\n",
    "cols_leave = ['x4', 'x5', 'x6', 'x7']\n",
    "\n",
    "standardize = [([col], StandardScaler()) for col in cols_standardize]\n",
    "leave = [(col, None) for col in cols_leave]\n",
    "\n",
    "x_mapper = DataFrameMapper(standardize + leave)"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 7,
   "metadata": {},
   "outputs": [],
   "source": [
    "x_train = x_mapper.fit_transform(df_train).astype('float32')\n",
    "x_val = x_mapper.transform(df_val).astype('float32')\n",
    "x_test = x_mapper.transform(df_test).astype('float32')"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "## Label transforms\n",
    "\n",
    "The survival methods require individual label transforms, so we have included a proposed `label_transform` for each method.\n",
    "In this case `label_transform` is just a shorthand for the class `pycox.preprocessing.label_transforms.LabTransDiscreteTime`.\n",
    "\n",
    "The `MTLR` is a discrete-time method, meaning it requires discretization of the event times to be applied to continuous-time data.\n",
    "We let `num_durations` define the size of this (equidistant) discretization grid, meaning our network will have `num_durations` output nodes."
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 8,
   "metadata": {},
   "outputs": [],
   "source": [
    "num_durations = 10\n",
    "labtrans = MTLR.label_transform(num_durations)\n",
    "get_target = lambda df: (df['duration'].values, df['event'].values)\n",
    "y_train = labtrans.fit_transform(*get_target(df_train))\n",
    "y_val = labtrans.transform(*get_target(df_val))\n",
    "\n",
    "train = (x_train, y_train)\n",
    "val = (x_val, y_val)\n",
    "\n",
    "# We don't need to transform the test labels\n",
    "durations_test, events_test = get_target(df_test)"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 9,
   "metadata": {},
   "outputs": [
    {
     "data": {
      "text/plain": [
       "pycox.preprocessing.label_transforms.LabTransDiscreteTime"
      ]
     },
     "execution_count": 9,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "type(labtrans)"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "## Neural net\n",
    "\n",
    "We make a neural net with `torch`.\n",
    "For simple network structures, we can use the `MLPVanilla` provided by `torchtuples`.\n",
    "For building more advanced network architectures, see for example [the tutorials by PyTroch](https://pytorch.org/tutorials/).\n",
    "\n",
    "The following net is an MLP with two hidden layers (with 32 nodes each), ReLU activations, and `num_nodes` output nodes.\n",
    "We also have batch normalization and dropout between the layers."
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 10,
   "metadata": {},
   "outputs": [],
   "source": [
    "in_features = x_train.shape[1]\n",
    "num_nodes = [32, 32]\n",
    "out_features = labtrans.out_features\n",
    "batch_norm = True\n",
    "dropout = 0.1\n",
    "\n",
    "net = tt.practical.MLPVanilla(in_features, num_nodes, out_features, batch_norm, dropout)"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "If you instead want to build this network with `torch` you can uncomment the following code.\n",
    "It is essentially equivalent to the `MLPVanilla`, but without the `torch.nn.init.kaiming_normal_` weight initialization."
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 11,
   "metadata": {},
   "outputs": [],
   "source": [
    "# net = torch.nn.Sequential(\n",
    "#     torch.nn.Linear(in_features, 32),\n",
    "#     torch.nn.ReLU(),\n",
    "#     torch.nn.BatchNorm1d(32),\n",
    "#     torch.nn.Dropout(0.1),\n",
    "    \n",
    "#     torch.nn.Linear(32, 32),\n",
    "#     torch.nn.ReLU(),\n",
    "#     torch.nn.BatchNorm1d(32),\n",
    "#     torch.nn.Dropout(0.1),\n",
    "    \n",
    "#     torch.nn.Linear(32, out_features)\n",
    "# )"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "## Training the model\n",
    "\n",
    "To train the model we need to define an optimizer. You can choose any `torch.optim` optimizer, but here we instead use one from `tt.optim` as it has some added functionality.\n",
    "We use the `Adam` optimizer, but instead of choosing a learning rate, we will use the scheme proposed by [Smith 2017](https://arxiv.org/pdf/1506.01186.pdf) to find a suitable learning rate with `model.lr_finder`. See [this post](https://towardsdatascience.com/finding-good-learning-rate-and-the-one-cycle-policy-7159fe1db5d6) for an explanation.\n",
    "\n",
    "We also set `duration_index` which connects the output nodes of the network the the discretization times. This is only useful for prediction and does not affect the training procedure."
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 12,
   "metadata": {},
   "outputs": [],
   "source": [
    "model = MTLR(net, tt.optim.Adam, duration_index=labtrans.cuts)"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 13,
   "metadata": {},
   "outputs": [
    {
     "data": {
      "image/png": "iVBORw0KGgoAAAANSUhEUgAAAYcAAAEKCAYAAAD5MJl4AAAABHNCSVQICAgIfAhkiAAAAAlwSFlzAAALEgAACxIB0t1+/AAAADh0RVh0U29mdHdhcmUAbWF0cGxvdGxpYiB2ZXJzaW9uMy4xLjEsIGh0dHA6Ly9tYXRwbG90bGliLm9yZy8QZhcZAAAgAElEQVR4nO3deXyU5bn/8c+VPYQsECBAAiSAbCKLBEHArSp1wb2lWjdwQU9tpZ7Wqj21Pba21V+r1q1aNxSreCpuoLbaKoICyib7IjuEnRDCkn3m/v0xCQZCyMxkJpPl+3698mLmmed57mvCJFfu3ZxziIiIVBcV6QBERKTxUXIQEZEalBxERKQGJQcREalByUFERGpQchARkRpiIh1AMNq1a+eys7MjHYaISJOycOHCvc659v6c2ySTQ3Z2NgsWLIh0GCIiTYqZbfb3XDUriYhIDUoOIiJSg5KDiIjU0CT7HESk+SkvLycvL4+SkpJIh9LkJSQkkJWVRWxsb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d0C/bz/BF+tLdXMejrnng1ncHUI9PueDvweGGxm91UmkcagtvfxBPCUmV2Mn8trNIXkYMc5dsKZe86534QplkAFFLtzrghfYmsMAo39bXzJrTEI+DMD4Jx7OfShBCzQ7/tnwGfhCiZAgcb+BL5fWo1BoLHnA7eHL5ygHfd9OOcOA+MDuVGj6pCuRR7QpdrzLGB7hGIJlGKPDMUeGYo98kL2PppCcpgPnGRmOWYWh6/jcFqEY/KXYo8MxR4Zij3yQvc+ItXTXkvv+xRgB98O5by58vhFwDf4euH/J9JxKvbG86XYFXtLir0h34cW3hMRkRqaQrOSiIg0MCUHERGpQclBRERqUHIQEZEalBxERKQGJQcREalByUEkBMzsUKRjEAklJQeRMDGz6EjHIBIsJQeREDLfjngzzOx1YFmk4xEJVlNYlVWkqTkN6O+c2xjpQESCpZqDSOjNU2KQpk7JQST0Dkc6AJH6UnIQEZEalBxERKQGLdktIiI1qOYgIiI1KDmIiEgNSg4iIlKDkoOIiNSg5CAiIjUoOYiISA1KDiIiUoOSg4iI1PD/ASVMVSDoGx4QAAAAAElFTkSuQmCC\n",
      "text/plain": [
       "<Figure size 432x288 with 1 Axes>"
      ]
     },
     "metadata": {
      "needs_background": "light"
     },
     "output_type": "display_data"
    }
   ],
   "source": [
    "batch_size = 256\n",
    "lr_finder = model.lr_finder(x_train, y_train, batch_size, tolerance=6)\n",
    "_ = lr_finder.plot()"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 14,
   "metadata": {},
   "outputs": [
    {
     "data": {
      "text/plain": [
       "0.0613590727341321"
      ]
     },
     "execution_count": 14,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "lr_finder.get_best_lr()"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "Often, this learning rate is a little high, so we instead set it manually to 0.01"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 15,
   "metadata": {},
   "outputs": [],
   "source": [
    "model.optimizer.set_lr(0.01)"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "We include the `EarlyStopping` callback to stop training when the validation loss stops improving. After training, this callback will also load the best performing model in terms of validation loss."
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 16,
   "metadata": {},
   "outputs": [
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "0:\t[0s / 0s],\t\ttrain_loss: 1.7319,\tval_loss: 1.4576\n",
      "1:\t[0s / 0s],\t\ttrain_loss: 1.5639,\tval_loss: 1.4277\n",
      "2:\t[0s / 0s],\t\ttrain_loss: 1.5177,\tval_loss: 1.4187\n",
      "3:\t[0s / 0s],\t\ttrain_loss: 1.4696,\tval_loss: 1.4052\n",
      "4:\t[0s / 0s],\t\ttrain_loss: 1.4436,\tval_loss: 1.3784\n",
      "5:\t[0s / 0s],\t\ttrain_loss: 1.4135,\tval_loss: 1.3748\n",
      "6:\t[0s / 0s],\t\ttrain_loss: 1.3904,\tval_loss: 1.3758\n",
      "7:\t[0s / 0s],\t\ttrain_loss: 1.3808,\tval_loss: 1.3634\n",
      "8:\t[0s / 0s],\t\ttrain_loss: 1.3674,\tval_loss: 1.3626\n",
      "9:\t[0s / 0s],\t\ttrain_loss: 1.3438,\tval_loss: 1.3766\n",
      "10:\t[0s / 0s],\t\ttrain_loss: 1.3339,\tval_loss: 1.3773\n",
      "11:\t[0s / 0s],\t\ttrain_loss: 1.3352,\tval_loss: 1.3672\n",
      "12:\t[0s / 0s],\t\ttrain_loss: 1.3296,\tval_loss: 1.3674\n",
      "13:\t[0s / 0s],\t\ttrain_loss: 1.3137,\tval_loss: 1.3677\n",
      "14:\t[0s / 0s],\t\ttrain_loss: 1.3214,\tval_loss: 1.3727\n",
      "15:\t[0s / 0s],\t\ttrain_loss: 1.3094,\tval_loss: 1.3679\n",
      "16:\t[0s / 0s],\t\ttrain_loss: 1.3053,\tval_loss: 1.3698\n",
      "17:\t[0s / 0s],\t\ttrain_loss: 1.3078,\tval_loss: 1.3727\n",
      "18:\t[0s / 0s],\t\ttrain_loss: 1.2979,\tval_loss: 1.3648\n"
     ]
    }
   ],
   "source": [
    "epochs = 100\n",
    "callbacks = [tt.callbacks.EarlyStopping()]\n",
    "log = model.fit(x_train, y_train, batch_size, epochs, callbacks, val_data=val)"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 17,
   "metadata": {},
   "outputs": [
    {
     "data": {
      "image/png": "iVBORw0KGgoAAAANSUhEUgAAAXoAAAD4CAYAAADiry33AAAABHNCSVQICAgIfAhkiAAAAAlwSFlzAAALEgAACxIB0t1+/AAAADh0RVh0U29mdHdhcmUAbWF0cGxvdGxpYiB2ZXJzaW9uMy4xLjEsIGh0dHA6Ly9tYXRwbG90bGliLm9yZy8QZhcZAAAgAElEQVR4nO3dd3xUdb7/8dc3mUnvlZCQQm+BAElAQUVsNMFVVOy47vXay726ur/d1dV177prd9eVdXeBa7mWBUVRsKGIDUhAOqEHEkoSEtL7zPf3x5mEAIG0Sc7M5PN8POYx7cw5n5DwPme+53u+X6W1RgghhOfyMrsAIYQQ3UuCXgghPJwEvRBCeDgJeiGE8HAS9EII4eEsZm04KipKJycnm7V5IYRwS+vXrz+mtY7uyGdMC/rk5GSys7PN2rwQQrglpdSBjn5Gmm6EEMLDSdALIYSHk6AXQggPZ1obvRDC8zQ0NJCfn09tba3Zpbg9Pz8/EhISsFqtXV6XBL0Qwmny8/MJDg4mOTkZpZTZ5bgtrTXFxcXk5+eTkpLS5fVJ040Qwmlqa2uJjIyUkO8ipRSRkZFO+2YkQS+EcCoJeedw5r+jaUFfWFFn1qaFEKJXMS3oC8prqaxrNGvzQgjRa5jadLPhwHEzNy+E8DClpaX87W9/6/Dnpk+fTmlpaYc/N2/ePBYvXtzhz/U004JeAWv3F5u1eSGEBzpT0NtstrN+bvny5YSFhXVXWaYzrXuln9WbdftLzNq8EKKbPbFsG9sPlzt1ncP7hvD45SPO+P6jjz7K3r17SUtLw2q1EhQURFxcHBs3bmT79u1cccUV5OXlUVtby/3338/tt98OnBh7q7KykmnTpjFp0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x288 with 1 Axes>"
      ]
     },
     "metadata": {
      "needs_background": "light"
     },
     "output_type": "display_data"
    }
   ],
   "source": [
    "_ = log.plot()"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "## Prediction\n",
    "\n",
    "For evaluation we first need to obtain survival estimates for the test set.\n",
    "This can be done with `model.predict_surv` which returns an array of survival estimates, or with `model.predict_surv_df` which returns the survival estimates as a dataframe."
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 18,
   "metadata": {},
   "outputs": [],
   "source": [
    "surv = model.predict_surv_df(x_test)"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "We can plot the survival estimates for the first 5 individuals.\n",
    "Note that the time scale is correct because we have set `model.duration_index` to be the grid points.\n",
    "We have, however, only defined the survival estimates at the 10 times in our discretization grid, so, the survival estimates is a step function"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 19,
   "metadata": {},
   "outputs": [
    {
     "data": {
      "image/png": "iVBORw0KGgoAAAANSUhEUgAAAYcAAAEGCAYAAACO8lkDAAAABHNCSVQICAgIfAhkiAAAAAlwSFlzAAALEgAACxIB0t1+/AAAADh0RVh0U29mdHdhcmUAbWF0cGxvdGxpYiB2ZXJzaW9uMy4xLjEsIGh0dHA6Ly9tYXRwbG90bGliLm9yZy8QZhcZAAAdmElEQVR4nO3de3hUdZ7n8feXcAlNYiM3L4RrKwpRRIhRt9VBW7cxurDdiuJ4QdTBmdW+PK77tI476jjreOlhu+ltd1pWG1t7WtrLOrIaUXtoZ/rx8YKo3SAYZRClFOQmdwIk+e4fdQiVVEIqoU5+p5LP63nqSZ1Tv6rzyUmlvvU7t5+5OyIiIpl6hA4gIiLJo+IgIiJZVBxERCSLioOIiGRRcRARkSw9QwfoiEGDBvnIkSNDxxARKRhLly7d5O6Dc21fkMVh5MiRvPPOO6FjiIgUDDP7tD3ttVlJRESyqDiIiEgWFQcREclSkPscRERC2L9/P6lUitra2tBRWlVcXExZWRm9evU6rNeJtTi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UREsqg4iIhIFhUHERHJouIgIiJZ/j8XEs8wCi3OMgAAAABJRU5ErkJggg==\n",
      "text/plain": [
       "<Figure size 432x288 with 1 Axes>"
      ]
     },
     "metadata": {
      "needs_background": "light"
     },
     "output_type": "display_data"
    }
   ],
   "source": [
    "surv.iloc[:, :5].plot(drawstyle='steps-post')\n",
    "plt.ylabel('S(t | x)')\n",
    "_ = plt.xlabel('Time')"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "It is, therefore, often beneficial to interpolate the survival estimates, see [this paper](https://arxiv.org/abs/1910.06724) for a discussion.\n",
    "Linear interpolation (constant density interpolation) can be performed with the `interpolate` method. We also need to choose how many points we want to replace each grid point with. Her we will use 10."
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 20,
   "metadata": {},
   "outputs": [],
   "source": [
    "surv = model.interpolate(10).predict_surv_df(x_test)"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 21,
   "metadata": {},
   "outputs": [
    {
     "data": {
      "image/png": "iVBORw0KGgoAAAANSUhEUgAAAYcAAAEGCAYAAACO8lkDAAAABHNCSVQICAgIfAhkiAAAAAlwSFlzAAALEgAACxIB0t1+/AAAADh0RVh0U29mdHdhcmUAbWF0cGxvdGxpYiB2ZXJzaW9uMy4xLjEsIGh0dHA6Ly9tYXRwbG90bGliLm9yZy8QZhcZAAAgAElEQVR4nO3deZwV9Znv8c/DJoZFWQVpNqMgtKjBFuK4hNxgROId4wiIxqjoHcYZTcxkGc14x2hmEpeXJjE33kmIV4xm3GccGUQ0xjAx3oTFiEFAkBGQBppVZZPV3/xx6nRXV58+S5+qU1Wnv+/Xq199qk71qR+nm376+T2/xZxziIiI+HWIuwEiIpI8Cg4iItKCgoOIiLSg4CAiIi0oOIiISAud4m5AW/Tt29cNGzYs7maIiKTG66+/vt0516/Y61MZHIYNG8aSJUviboaISGqY2fpSrle3koiItKDgICIiLSg4iIhIC6msOYiIxOHQoUPU19ezf//+uJvSqq5du1JTU0Pnzp3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TOzfzWzxd7H2fH+C0Rap+AgEo7TgJuAMcCXgRHOuXHAg8BXvGvuB37onDsTuNR7TiSRVHMQCcdi561VY2b/BbzknV8GfNZ7PBEY7dsCoKeZ9XCZvRBEEkXBQSQcB3yPP/Ydf0zT/7MOwFnOuY8q2TCRtlC3kkjlvATcmD3I7u8rkkQKDiKV81WgztulawVwfdwNEmmNhrKKiEgLyhxERKQFBQcREWlBwUFERFpQcBARkRYUHEREpAUFBxERaUHBQUREWvhvGrZIox81cokAAAAASUVORK5CYII=\n",
      "text/plain": [
       "<Figure size 432x288 with 1 Axes>"
      ]
     },
     "metadata": {
      "needs_background": "light"
     },
     "output_type": "display_data"
    }
   ],
   "source": [
    "surv.iloc[:, :5].plot(drawstyle='steps-post')\n",
    "plt.ylabel('S(t | x)')\n",
    "_ = plt.xlabel('Time')"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "## Evaluation\n",
    "\n",
    "The `EvalSurv` class contains some useful evaluation criteria for time-to-event prediction.\n",
    "We set `censor_surv = 'km'` to state that we want to use Kaplan-Meier for estimating the censoring distribution.\n"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 22,
   "metadata": {},
   "outputs": [],
   "source": [
    "ev = EvalSurv(surv, durations_test, events_test, censor_surv='km')"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "#### Concordance\n",
    "\n",
    "We start with the event-time concordance by [Antolini et al. 2005](https://onlinelibrary.wiley.com/doi/10.1002/sim.2427)."
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 23,
   "metadata": {},
   "outputs": [
    {
     "data": {
      "text/plain": [
       "0.6572131078044852"
      ]
     },
     "execution_count": 23,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "ev.concordance_td('antolini')"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "#### Brier Score\n",
    "\n",
    "We can plot the the [IPCW Brier score](https://onlinelibrary.wiley.com/doi/abs/10.1002/%28SICI%291097-0258%2819990915/30%2918%3A17/18%3C2529%3A%3AAID-SIM274%3E3.0.CO%3B2-5) for a given set of times.\n",
    "Here we just use 100 time-points between the min and max duration in the test set.\n",
    "Note that the score becomes unstable for the highest times. It is therefore common to disregard the rightmost part of the graph."
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 24,
   "metadata": {},
   "outputs": [
    {
     "data": {
      "image/png": "iVBORw0KGgoAAAANSUhEUgAAAYgAAAEGCAYAAAB/+QKOAAAABHNCSVQICAgIfAhkiAAAAAlwSFlzAAALEgAACxIB0t1+/AAAADh0RVh0U29mdHdhcmUAbWF0cGxvdGxpYiB2ZXJzaW9uMy4xLjEsIGh0dHA6Ly9tYXRwbG90bGliLm9yZy8QZhcZAAAgAElEQVR4nO3dd3zU9f3A8df7LrksMiFhJQHCBgGBMBxVQLQ4qavOVqutWqt2t3b8nK3aWqttta1asdaKe4B1D0AcIHsTCGFkAEnIIHvd5/fHfcEQLsmF3PG9u7yfj0ceuft+v5d7f7nAm8/n/RlijEEppZRqy2F3AEoppYKTJgillFJeaYJQSinllSYIpZRSXmmCUEop5VWE3QH4S58+fczgwYPtDkMppULKqlWrSo0xqd7OhU2CGDx4MCtXrrQ7DKWUCikisru9c9rFpJRSyitNEEoppbzSBKGUUsorTRBKKaW80gShlFLKK00QSimlvNIEoZRSyquwmQeh1LFqanGzqegg6/IrmJSZzLj0RLtDUiooaIJQPU5js5t1BRV8seMAX+w4wJr8cuqb3AC4nA7uu2gcl0xOtzlKpeynCUL1CE0tbhbnlPDqqgKWbCuhrqkFERjTP4HLp2QyZXAKI/vFc+fCjfzs5XVs31/FL+aMwukQu0NXyjaaIFRYq6xt4u+Lc3llVQEHahrpHefiksnpnDKsD9OzUkiKdR1x/b+/M5V73tzM45/kkbO/ijvOG0NWai+bolfKXpogVFgyxvDq6kLuf3sL5bWNfH1sPy6elM7pI1OJdLY/NiPS6eDeb5zAiL69uO/trZz58CdcPGkgt50xnPTk2ON4B0rZT8JlT+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HOz5vrH7qp4Atxpg/tzoVcp9Le/cSop9LqogkWY9jgNl4aiqLgEusy9p+Loc+r0uAj41VsT6u7K7u++MLz0iMbXj69H5jdzxdjD0Lz8iLdcCmQ/Hj6W/8CNhufU+xO1YvsT+Pp4nfhOd/PNe3FzeeJvNj1me0Aci2O34f7uVZK9b1eP7C9m91/W+se8kBzrY7/lZxnYqnK2I9sNb6OicUP5cO7iUUP5fxwBor5o3AHdbxLDxJLBd4GYiyjkdbz3Ot81l2xK1LbSillPIqHLqYlFJKBYAmCKWUUl5pglBKKeWVJgillFJeaYJQSinlVUTnlyilWhORQ0NGAfoBLUCJ9bzWGHOyLYEp5Wc6zFWpbhCRu4BqY8yf7I5FKX/TLial/EhEqq3vM0RkiYi8JCLbROQBEbnK2hNgg4gMta5LFZFXRWSF9XWKvXeg1Fc0QSgVOBOAHwLjgG8BI4wxU4F/Abda1/wFeNgYMwW42DqnVFDQGoRSgbPCWOsaicgO4H3r+AZgpvV4NjCm1VL/CSISbzz7HyhlK00QSgVOQ6vH7lbP3Xz1d88BnGSMqTuegSnlC+1iUspe7wO3HHoiIifaGItSR9AEoZS9bgOyrd3RNgM32R2QUofoMFellFJeaQtCKaWUV5oglFJKeaUJQimllFeaIJRSSnmlCUIppZRXmiCUUkp5pQlCKaWUV/8PQhtjQemiBssAAAAASUVORK5CYII=\n",
      "text/plain": [
       "<Figure size 432x288 with 1 Axes>"
      ]
     },
     "metadata": {
      "needs_background": "light"
     },
     "output_type": "display_data"
    }
   ],
   "source": [
    "time_grid = np.linspace(durations_test.min(), durations_test.max(), 100)\n",
    "ev.brier_score(time_grid).plot()\n",
    "plt.ylabel('Brier score')\n",
    "_ = plt.xlabel('Time')"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "#### Negative binomial log-likelihood\n",
    "\n",
    "In a similar manner, we can plot the the [IPCW negative binomial log-likelihood](https://onlinelibrary.wiley.com/doi/abs/10.1002/%28SICI%291097-0258%2819990915/30%2918%3A17/18%3C2529%3A%3AAID-SIM274%3E3.0.CO%3B2-5)."
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 25,
   "metadata": {},
   "outputs": [
    {
     "data": {
      "image/png": "iVBORw0KGgoAAAANSUhEUgAAAYIAAAEGCAYAAABo25JHAAAABHNCSVQICAgIfAhkiAAAAAlwSFlzAAALEgAACxIB0t1+/AAAADh0RVh0U29mdHdhcmUAbWF0cGxvdGxpYiB2ZXJzaW9uMy4xLjEsIGh0dHA6Ly9tYXRwbG90bGliLm9yZy8QZhcZAAAgAElEQVR4nO3deXhU9bnA8e+bmWSyQkIIgYSwr5GdsCjiguJecBe11tYF27q0V7vQ5fpYu1m9trUtXkWr1x3XWqoIiisuIGE3hIQQloSQkITse2Z+948ZMMJkIclwZnk/z5MnM+f8ZvIeDpk3v12MMSillApdYVYHoJRSylqaCJRSKsRpIlBKqRCniUAppUKcJgKllApxdqsDOFH9+/c3w4YNszoMpZQKKBs3biwzxiR5OxdwiWDYsGFkZmZaHYZSSgUUEdnX3jltGlJKqRCniUAppUKcJgKllApxmgiUUirEaSJQSqkQp4lAKaVCnCYCpZQKcQE3j0Cp7nC6DHvK6sg+WM2hmiYun5pKQkyE1WEp5Rc0Eaig09zqYlthJV8dqCL7YA3ZxdXkFNfQ1Oo6Wubxj3fz8NWTmTva60RLpUKKJgIVFIqrGnlrWxGf5ZWxfs9h6pudACREhzN+UB++PXso4wf1YfygOFqchp+8upUb/vkl35szjJ9fMI7IcJvFV6CUdTQRqIBljOGL3eU8t24f7+4owekyjEiK4crpgzltZH+mDolnQJwDETnutW/deToPvLOTpz/by7+3FHHFtFQWzRzCyKRYC65EKWtJoG1VmZGRYXStodC1u7SWz/PK2LC3gg17D3OwqpH46HCuyUjj2plDGNY/5oTeb31+OU9/tpc12SW0ugwzhiWwYEoqF00YSGKsw0dXodTJJyIbjTEZXs9pIlCBYmtBJZf/7+c4XYbkPg4yhvVj3tgBXDxpUI+bdg7VNPLaxkJe31jI7tI6bGHCaSMTmT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qCUUiFOE4FSSoU4TQRKKRXiNBEopVSI00SglFIhThOBUkqFOE0ESikV4v4fSAjfxj1Vl1MAAAAASUVORK5CYII=\n",
      "text/plain": [
       "<Figure size 432x288 with 1 Axes>"
      ]
     },
     "metadata": {
      "needs_background": "light"
     },
     "output_type": "display_data"
    }
   ],
   "source": [
    "ev.nbll(time_grid).plot()\n",
    "plt.ylabel('NBLL')\n",
    "_ = plt.xlabel('Time')"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "#### Integrated scores\n",
    "\n",
    "The two time-dependent scores above can be integrated over time to produce a single score [Graf et al. 1999](https://onlinelibrary.wiley.com/doi/abs/10.1002/%28SICI%291097-0258%2819990915/30%2918%3A17/18%3C2529%3A%3AAID-SIM274%3E3.0.CO%3B2-5). In practice this is done by numerical integration over a defined `time_grid`."
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 26,
   "metadata": {},
   "outputs": [
    {
     "data": {
      "text/plain": [
       "0.16715497913570207"
      ]
     },
     "execution_count": 26,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "ev.integrated_brier_score(time_grid) "
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 27,
   "metadata": {},
   "outputs": [
    {
     "data": {
      "text/plain": [
       "0.4933129163806694"
      ]
     },
     "execution_count": 27,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "ev.integrated_nbll(time_grid) "
   ]
  },
  {
   "cell_type": "code",
   "execution_count": null,
   "metadata": {},
   "outputs": [],
   "source": []
  }
 ],
 "metadata": {
  "kernelspec": {
   "display_name": "Python 3",
   "language": "python",
   "name": "python3"
  },
  "language_info": {
   "codemirror_mode": {
    "name": "ipython",
    "version": 3
   },
   "file_extension": ".py",
   "mimetype": "text/x-python",
   "name": "python",
   "nbconvert_exporter": "python",
   "pygments_lexer": "ipython3",
   "version": "3.7.4"
  }
 },
 "nbformat": 4,
 "nbformat_minor": 4
}
